﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Polaris.Domain.Model.DbEntity
{
    /// <summary>
    /// 系统用户表
    /// </summary>
    public class Sys_User
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        [Comment("主键")]
        public Guid Id { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [Comment("账号"), MaxLength(255)]
        public string? Account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Comment("密码"), MaxLength(255)]
        public string? Password { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Comment("用户名"), MaxLength(255)]
        public string? UserName { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [Comment("头像")]
        public string? Head { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        [Comment("角色")]
        public Guid? UserRole { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        [Comment("最后登录时间"), MaxLength(255)]
        public string? LastLoginTime { get; set; }

        /// <summary>
        /// 最后登录IP
        /// </summary>
        [Comment("最后登录IP"), MaxLength(255)]
        public string? LastLoginIP { get; set; }

        /// <summary>
        /// 登录凭证-token登录凭证-token？是否需要这个字段
        /// </summary>
        [Comment("登录凭证-token？是否需要这个字段")]
        public string? UserToken { get; set; }

        /// <summary>
        /// 微信登录Code？是否需要这个字段
        /// </summary>
        [Comment("微信登录Code？是否需要这个字段")]
        public string? WeChat { get; set; }

        /// <summary>
        /// 是否可用
        /// </summary>
        [Comment("是否可用")]
        public bool Enable { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Comment("是否删除")]
        public bool IsDelete { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Comment("创建人")]
        public Guid? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Comment("修改人")]
        public Guid? UpdatedBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Comment("修改时间")]
        public DateTime? UpdatedTime { get; set; }

    }
}
